import IndexView from "@/views/IndexView.vue";
import HomeView from "../views/HomeView.vue";
import { createRouter, createWebHashHistory } from "vue-router";

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: "index",
      component: IndexView,
      children: [
        {
          path: "/",
          name: "home",
          component: () => import("../views/HomeView.vue"),
        },
        {
          path: "/blog/public",
          name: "blogPublic",
          component: () => import("../views/BlogPublic.vue"),
        },
        {
          path: "/blog/:pk",
          name: "blogDetail",
          component: () => import("../views/BlogView.vue"),
        },
       
      ],
    },
    {
      path: "/login",
      name: "Login",
      component: () => import("../views/LoginView.vue"),
    },
  ],
});

export default router;
